import random

import pytest


class Test01:
    @pytest.mark.run(order = -1)
    def testM1(self):
        print("测试类- 11")

    @pytest.mark.run(order = 2)
    def testM2(self):
        print("测试类- 22")

    @pytest.mark.run(order = 1)
    def testM3(self):
        num = random.randint(1,10)
        print("测试类- 33")
        assert num > 5

    @pytest.mark.skipif(1==2,reason='因为1==1')
    def testSkipif(self):
        print("跳过执行的用例")

    @pytest.mark.skip("直接跳过的用例")
    def testSkip(self):
        print("直接跳过")

    @pytest.mark.parametrize("username,password",[('user1','123456'),('user2','abcdef')])
    def testLogin(self,username,password):
        print(f"用户名字{username},用户密码{password}")
